package com.e3.core.base;

import java.io.Serializable;

public class EntityPK implements Serializable {
	private static final long serialVersionUID = -3526293729848477895L;

	private long id;
	
	protected long getId() {
		return id;
	}

	protected void setId(long id) {
		this.id = id;
	}

	@Override
	public int hashCode() {
		return (int)id;
	}

	@Override
	public boolean equals(Object obj) {
		if(this == obj){
			return true;
		}
		if(!(obj instanceof EntityPK)){
			return false;
		}
		EntityPK pk = (EntityPK)obj;
		if(pk!=null&&this.getId()==pk.getId()){
			return true;
		}
		return false;
	}

}
